﻿import java.util.Random;


public class Exercise5 {

	public static void main(String[] args) {
		//创建一个Random对象
        Random random=new Random();
        //随机生成20个随机整数,并显示
        for (int i = 0; i < 20; i++) {
			int num=random.nextInt(20);
			System.out.println("第"+(i+1)+"随机数是:"+num);
		}
	}

}
